import {Controller, Render, Get, QueryParam, Session} from "routing-controllers";
import {utils} from "../../utils/utils";
import { Service, Inject } from "typedi";
import { CarServiceImpl } from "../../service/impl/CarServiceImpl";

@Service()
@Controller()
export class PaymentControllerHome {

	@Inject()
	private carServiceImpl: CarServiceImpl;
	
	@Get("/payment")
	@Render("home/page/payresult")
	public async PaymentResults (@Session() session,
	                             @QueryParam('out_trade_no') orderNumber: string): Promise<Object> {
		
		return {
			title: utils.titleName("支付成功"),
			isShowAction: {
				header: true,
				footer: true
			},
			banner: {
				bannerTitle: '支付成功',
				bannerUrl: '/img/banner_7.png',
			},
			login: session.user ? session.user : false
		}
	}
}